package ca.llsutherland.nfl.court;

import ca.llsutherland.squash.domain.Clock;
import ca.llsutherland.squash.domain.Court;
import ca.llsutherland.squash.domain.CourtStyle;
import ca.llsutherland.squash.domain.Gym;
import ca.llsutherland.squash.domain.helper.CourtsHelper;
import ca.llsutherland.squash.gym.GymsFixture;

public class CourtsFixture {

    public static Court createUnpersistedCourtWithGym(String name, Clock dateCreated, Clock dateUpdated) {
        Gym gym = GymsFixture.createRandomValidGym();
        String location = "my location";
        String specialNotes = "my special notes";
        return CourtsHelper.createUnpersistedCourt(name, dateCreated, dateUpdated, location, specialNotes, gym);
    }

    public static Court createUnpersistedCourtWithGymAndCourtStyle(String name, Clock dateCreated, Clock dateUpdated) {
        CourtStyle courtStyle = CourtStylesFixture.findRandomValidCourtStyle();
        Court court = createUnpersistedCourtWithGym(name, dateCreated, dateUpdated);
        court.setCourtStyle(courtStyle);
        return court;
    }

    public static Court createUnpersistedCourtWithGymAndCourtStyle(String name, Clock dateCreated, Clock dateUpdated, String location) {
        Court court = createUnpersistedCourtWithGymAndCourtStyle(name, dateCreated, dateUpdated);
        court.setLocation(location);
        return court;
    }

    public static Court createUnpersistedCourtWithGymAndCourtStyle(String name, Clock dateCreated, Clock dateUpdated, String location, String specialNotes) {
        Court court = createUnpersistedCourtWithGymAndCourtStyle(name, dateCreated, dateUpdated, location);
        court.setSpecialNotes(specialNotes);
        return court;
    }

}
